c23436
@@ -85,7 +85,9 @@
public synchronized void init(HiveConf hiveConf) {
   private void applyAuthorizationConfigPolicy(HiveConf newHiveConf) throws HiveException {
     // authorization setup using SessionState should be revisited eventually, as
     // authorization and authentication are not session specific settings
-    SessionState ss = SessionState.start(newHiveConf);
+    SessionState ss = new SessionState(newHiveConf);
+    ss.setIsHiveServerQuery(true);
+    SessionState.start(ss);
     ss.applyAuthorizationPolicy();
   }
 
